﻿@using Orchard.ContentManagement
@{
    Style.Include("login-soft.css");  
    var userCanRegister = WorkContext.CurrentSite.As<Orchard.Users.Models.RegistrationSettingsPart>().UsersCanRegister;
    var enableLostPassword = WorkContext.CurrentSite.As<Orchard.Users.Models.RegistrationSettingsPart>().EnableLostPassword;
}
<style>
.page-content { background:none !important }
.zone-footer { background-color: #364150; }
.validation-summary-errors
{
    background-color: #f2dede;
    border-color: #ebccd1;
    color: #a94442;
    border-width: 1px;
}
</style>

<div class="login">
    <div class="content">
        <!-- BEGIN LOGIN FORM -->                    
        @using (Html.BeginFormAntiForgeryPost(Url.Action("LogOn", new { ReturnUrl = Request.QueryString["ReturnUrl"] }), FormMethod.Post, new { @class = "login-form" })) {
            <h3 class="form-title">@Html.TitleForPage((string)Model.Title)</h3>
            @Html.ValidationSummary(T("Login was unsuccessful. Please correct the errors and try again.").ToString())
            <div class="alert alert-danger display-hide">
                <button class="close" data-close="alert"></button>
                <span>
                Enter any username and password. </span>
            </div>            

            <div class="form-group">
                <!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
                <label class="control-label visible-ie8 visible-ie9">Username</label>                                        
                <div class="input-icon">
                    <i class="fa fa-user"></i>
                    <input id="username-email" autofocus="autofocus" class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="用户名" name="userNameOrEmail"/>
                </div>
                @Html.ValidationMessage("userNameOrEmail")
            </div>
            <div class="form-group">
                <label class="control-label visible-ie8 visible-ie9">Password</label>                
                <div class="input-icon">
                    <i class="fa fa-lock"></i>
                    <input class="form-control placeholder-no-fix" id="password" type="password" autocomplete="off" placeholder="密码" name="password"/>
                </div>
                @Html.ValidationMessage("password")
            </div>
            <div class="form-actions">
                <label class="checkbox">
                <input type="checkbox" id="remember-me" name="rememberMe" value="true"/> 记住我 </label>
                <button type="submit" class="btn blue pull-right">
                登陆 <i class="m-icon-swapright m-icon-white"></i>
                </button>
            </div>
            <div class="forget-password">
                <h4>登陆遇到问题 ?</h4>
                <p>
                     ^_^ 点击 <a href="javascript:;" id="forget-password">
                    这里 </a>
                    查看解决方法.
                </p>
            </div>
        }
        <!-- END LOGIN FORM -->
        <!-- BEGIN FORGOT PASSWORD FORM -->
        <form class="forget-form" action="index.html" method="post">
            <h3>有问题 ?</h3>
            <p>
                 欢迎来电咨询.
            </p>
            <div class="form-group">
                <div class="input-icon">
                    <i class="fa fa-phone"></i>
                    <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="13097743084" readonly="readonly" name="email"/>
                </div>
            </div>
            <div class="form-actions">
                <button type="button" id="back-btn" class="btn">
                <i class="m-icon-swapleft"></i> 返回 </button>
            </div>
        </form>
        <!-- END FORGOT PASSWORD FORM -->
    </div>
</div>

@using (Script.Foot())
{
<script src="/assets/global/plugins/backstretch/jquery.backstretch.min.js" type="text/javascript"></script>
<script src="/assets/global/plugins/jquery-validation/js/jquery.validate.min.js" type="text/javascript"></script>
<script src="/assets/global/plugins/select2/select2.min.js" type="text/javascript"></script>
<script src="/assets/admin/pages/scripts/login-soft.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function() { 
    Login.init();    
    // init background slide images
    $("body").backstretch([
    "/assets/admin/pages/media/bg/1.jpg",
    "/assets/admin/pages/media/bg/2.jpg",
    "/assets/admin/pages/media/bg/3.jpg",
    "/assets/admin/pages/media/bg/4.jpg"
    ], { fade: 1000, duration: 8000 }
    );
});
</script>
}